#include <iostream>

using namespace std;

int main(void)
{
    int pig[5];

    int i;
    for (i = 0; i < 5; i++)
    {
        cout << "请输入第" << i + 1 << "只猪的体重：";
        cin >> pig[i];
    }

    int max = pig[0];
    int exchange;
    for (i = 0; i < 4; i++)
    {
        if(pig[i] < pig[i + 1])
        {
            max = pig[i + 1];
        }
    }

    cout << "最重的小猪重：" << max << endl;

    return 0;
}